import { Define, EntityObjectFactory } from 'tiny-entity2';
const EntityObjectType = EntityObjectFactory.GetEntityObjectType(process.env.dataBaseType || 'mysql');
@Define.Table({ TableName: "datasource" })
export class DataSource extends EntityObjectType<DataSource>{
    @Define.PrimaryKey()
    id: string;

    @Define.Column({
        DataType: Define.DataType.VARCHAR
    })
    name: string;

    @Define.Column({
        DataType: Define.DataType.JSON
    })
    data: any;

    @Define.Column({
        DataType: Define.DataType.VARCHAR
    })
    objectId: string;

    @Define.Column({
        DataType: Define.DataType.VARCHAR
    })
    objectType: string;

    @Define.Column({
        DataType: Define.DataType.VARCHAR
    })
    dataType: string;

    @Define.Column({
        DataType: Define.DataType.VARCHAR,
        IsIndex: true
    })
    orgId: string;

    @Define.Column({
        DataType: Define.DataType.JSON
    })
    industry: string[];
}